#!/bin/bash
# Zaitan Module - JDK6 Install
# Zaitan Team <http://code.google.com/p/zaitan/>

RMOD_ENGINE='3.0'
RMOD_CATEGORY='Desenvolvimento'
RMOD_SUBCATEGORY='Java'
RMOD_NAME='Sun-JDK6'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='JDK6'
RMOD_DESCRIPTION='Installs Sun-JDK6'
RMOD_UPDATE_URL='http://code.google.com/p/zaitan/'

# Install Sun-JDK6

echo Running $RMOD_NAME...
#/usr/lib/zaitan/modulo/mod-checkInstall

apt-get update
apt-get -y install sun-java6-jdk
apt-get -y install sun-java6-plugin
apt-get -y install sun-java6-fonts

cd /usr/share/zaitan
wget -c http://mirrors.uol.com.br/pub/mysql/Downloads/Connector-J/mysql-connector-java-5.0.5.tar.gz
tar -zxvf mysql-connector-java-5.0.5.tar.gz
cd mysql-connector-java-5.0.5/
mv mysql-connector-java-5.0.5-bin.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
#export set CLASSPATH=/usr/lib/jvm/java-6-sun/jre/lib/ext/mysql-connector-java-5.0.5-bin.jar:$CLASSPATH


## Jar Conector jdbc Sqlite
wget -c http://www.zentus.com/sqlitejdbc/dist/sqlitejdbc-v037-nested.tgz
tar xvzf sqlitejdbc-*.tgz
mv sqlitejdbc-*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
rm -rf README


echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##

exit 0

